import { ObjectType, Field, Int, Float } from '@nestjs/graphql';
import { Owner } from 'src/owners/entities/owner.entity';
import { Column, Entity, ManyToOne, PrimaryColumn } from 'typeorm';

@ObjectType()
@Entity()
export class Product {
  @Field(() => Int, { description: 'Example field (placeholder)' })
  @PrimaryColumn()
  id: number;

  @Field()
  @Column()
  owner_id: number;

  @Field()
  @Column()
  name: string;

  @Field()
  @Column()
  type: string;

  @Field()
  @Column()
  detail: string;

  @Field(() => Owner)
  owner: Owner;
}
